<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
<Configure id="wac" class="org.eclipse.jetty.webapp.WebAppContext">
    <New id="sendThreadPools" class="org.eclipse.jetty.plus.jndi.Resource">
        <Arg><Ref refid="wac"/></Arg>
        <Arg>thread/pool/mailsender</Arg>
        <Arg>
            <New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
                <Set name="minThreads">10</Set>
                <Set name="maxThreads">200</Set>
                <Call name="start"/>
            </New>
        </Arg>
    </New>
    <New id="mail" class="org.eclipse.jetty.plus.jndi.Resource">
        <Arg><Ref refid="wac"/></Arg>
        <Arg>mail/MailSession</Arg>
        <Arg>
            <New class="org.eclipse.jetty.jndi.factories.MailSessionReference">
                <Set name="user"><SystemProperty name="mail.user" default="user"/></Set>
                <Set name="password"><SystemProperty name="mail.password" default="password"/></Set>
                <Set name="properties">
                    <New class="java.util.Properties">
                        <Put name="mail.smtp.host"><SystemProperty name="mail.smtp.host" default="localhost"/></Put>
                        <Put name="mail.smtp.port"><SystemProperty name="mail.smtp.port"  default="4430"/></Put>
                        <Put name="mail.from"><SystemProperty name="mail.from" default="robot@pooller.ru"/></Put>
                        <Put name="mail.debug">true</Put>
                        <Put name="mail.smtp.auth">true</Put>
                        <Put name="mail.smtp.ssl.enable"><SystemProperty name="mail.ssl" default="false"/></Put>
                        <Put name="mail.smtp.ssl.trust">*</Put>
<!--                        <Put name="mail.smtp.starttls.enable">true</Put>-->
                    </New>
                </Set>
            </New>
        </Arg>
    </New>
    <New id="ds" class="org.eclipse.jetty.plus.jndi.Resource">
        <Arg></Arg>
        <Arg>jdbc/PoolingDB</Arg>
            <Arg>
                <New class="org.postgresql.ds.PGSimpleDataSource">
                    <Set name="databaseName">pooller</Set>
                    <Set name="serverName">localhost</Set>
                    <Set name="portNumber">15432</Set>
<!--                    <Set name="user">pooller</Set>-->
<!--                    <Set name="password">pooller</Set>-->
<!--                    <Set name="driverClass">org.postgresql.Driver</Set>-->
<!--                    <Set name="jdbcUrl"><SystemProperty name="pg.url" default="jdbc:postgresql://localhost:15432/pooller"/>?ApplicationName=Jetty</Set>-->
                    <Set name="user"><SystemProperty name="pg.user" default="pooller"/></Set>
                    <Set name="password"><SystemProperty name="pg.password" default="pooller"/></Set>
                </New>
            </Arg>
    </New>
    <New id="demodata" class="org.eclipse.jetty.plus.jndi.Resource">
        <Arg><Ref refid="wac"/></Arg>
        <Arg>parameter/generate-demodata</Arg>
        <Arg>
            <New class="java.lang.String">
                <Arg type="String">true</Arg>
            </New>
        </Arg>
    </New>
    <Call name="setInitParameter">
        <Arg>org.eclipse.jetty.servlet.Default.useFileMappedBuffer</Arg>
        <Arg>false</Arg>
    </Call>
    <Set name="contextPath">/</Set>
    <Set name="war"><Property name="jetty.webapps" default="."/>/main-server-1.0-SNAPSHOT.war</Set>
</Configure>
